<script type="text/html" template lay-url="agent-admin/registries/{{d.params.id}}">
  {{# let data = d.data || {}; }}
  <div class="layui-card">
    <div class="layui-card-header">
      作品信息
    </div>
    <div class="layui-card-body">
      <div class="layui-form-item">
        <label class="layui-form-label">创建人</label>
        <div class="layui-input-inline layui-word-aux layui-form-mid">
          {{data.user.mobile}}
          {{# if (data.user.auth) { }}
          ({{data.user.auth.real_name}})
          {{# } }}
        </div>
      </div>
      <div class="layui-row">
        <div class="layui-inline">
          <div class="layui-form-item">
            <label class="layui-form-label">作品名称</label>
            <div class="layui-input-inline layui-word-aux layui-form-mid">
              {{data.product_name}}
            </div>
          </div>
        </div>
        <div class="layui-inline">
          <div class="layui-form-item">
            <label class="layui-form-label">登记状态</label>
            <div class="layui-input-inline layui-word-aux layui-form-mid">
              {{data.status.description}}
            </div>
          </div>
        </div>
      </div>
      <div class="layui-row">
        <div class="layui-inline">
          <div class="layui-form-item">
            <label class="layui-form-label">创作性质</label>
            <div class="layui-input-inline layui-word-aux layui-form-mid">
              {{data.product_create_nat}}
            </div>
          </div>
        </div>
        <div class="layui-inline">
          <div class="layui-form-item">
            <label class="layui-form-label">作品类别</label>
            <div class="layui-input-inline layui-word-aux layui-form-mid">
              {{data.product_cat}}
            </div>
          </div>
        </div>
      </div>
      <div class="layui-row">
        {{# if (data.word_count) { }}
        <div class="layui-inline">
          <div class="layui-form-item">
            <label class="layui-form-label">文字字数</label>
            <div class="layui-input-inline layui-word-aux layui-form-mid">
              {{data.word_count}}
            </div>
          </div>
        </div>
        {{# } }}
        {{# if (data.video_length) { }}
        <div class="layui-inline">
          <div class="layui-form-item">
            <label class="layui-form-label">视频长度</label>
            <div class="layui-input-inline layui-word-aux layui-form-mid">
              {{data.video_length}}
            </div>
          </div>
        </div>
        {{# } }}
      </div>
      <div class="layui-form-item">
        <label class="layui-form-label">作品文件</label>
        <div class="layui-form-mid">
          {{# layui.each(data.product_files, function(index, file) { }}
          <a style="padding-right: 20px; color: blue" href="{{file.file_path}}" target="_blank">文件{{index+1}}</a>
          {{# }) }}
        </div>
      </div>
      <div class="layui-form-item">
        <label class="layui-form-label">作品图片</label>
        <div class="layui-form-mid">
          {{# layui.each(data.product_images, function(index, file) { }}
          <img style="width: 100px; object-fit: scale-down" src="{{file.file_path}}" layadmin-event="imagePreview">
          {{# }) }}
        </div>
      </div>
      <div class="layui-row">
        <div class="layui-inline">
          <div class="layui-form-item">
            <label class="layui-form-label">完成时间</label>
            <div class="layui-input-inline layui-word-aux layui-form-mid">
              {{data.product_create_date}}
            </div>
          </div>
        </div>
        <div class="layui-inline">
          <div class="layui-form-item">
            <label class="layui-form-label">完成地点</label>
            <div class="layui-input-inline layui-word-aux layui-form-mid">
              {{data.product_create_address}}
            </div>
          </div>
        </div>
      </div>
      <div class="layui-form-item">
        <label class="layui-form-label">发表状态</label>
        <div class="layui-word-aux layui-form-mid">
          {{data.is_pub ? '已发表' : '未发表'}}
        </div>
      </div>
      <div class="layui-row">
        <div class="layui-inline">
          <div class="layui-form-item">
            <label class="layui-form-label">发表时间</label>
            <div class="layui-input-inline layui-word-aux layui-form-mid">
              {{data.product_pub_date || '--'}}
            </div>
          </div>
        </div>
        <div class="layui-inline">
          <div class="layui-form-item">
            <label class="layui-form-label">发表地点</label>
            <div class="layui-input-inline layui-word-aux layui-form-mid">
              {{data.product_pub_address || '--'}}
            </div>
          </div>
        </div>
      </div>
      <div class="layui-form-item">
        <label class="layui-form-label">创作意图</label>
        <div class="layui-word-aux layui-form-mid">
          {{data.create_intention || '--'}}
        </div>
      </div>
    </div>
  </div>
  <div class="layui-card">
    <div class="layui-card-header">
      权利权属信息
    </div>
    <div class="layui-card-body">
      <div class="layui-row">
        <div class="layui-inline">
          <div class="layui-form-item">
            <label class="layui-form-label">归属方式</label>
            <div class="layui-input-inline layui-word-aux layui-form-mid">
              {{data.belong_method}}
            </div>
          </div>
        </div>
        <div class="layui-inline">
          <div class="layui-form-item">
            <label class="layui-form-label">申请方式</label>
            <div class="layui-input-inline layui-word-aux layui-form-mid">
              {{data.apply_method}}
            </div>
          </div>
        </div>
      </div>
      <div class="layui-form-item">
        <label class="layui-form-label">归属说明</label>
        <div class="layui-input-inline layui-word-aux layui-form-mid">
          {{data.belong_method_explain || '--'}}
        </div>
      </div>
      <div class="layui-form-item">
        <label class="layui-form-label">拥有状况</label>
        <div class="layui-word-aux layui-form-mid">
          {{data.hold_names}}
        </div>
      </div>
      <div class="layui-form-item">
        <label class="layui-form-label">拥有状况说明</label>
        <div class="layui-input-inline layui-word-aux layui-form-mid">
          {{data.hold_names_explain || '--'}}
        </div>
      </div>
      <div class="layui-form-item">
        <label class="layui-form-label">取得方式</label>
        <div class="layui-input-inline layui-word-aux layui-form-mid">
          {{data.accept_method}}
        </div>
      </div>
      <div class="layui-form-item">
        <label class="layui-form-label">取得方式说明</label>
        <div class="layui-input-inline layui-word-aux layui-form-mid">
          {{data.accept_method_explain || '--'}}
        </div>
      </div>
      <div class="layui-form-item">
        <label class="layui-form-label">作者</label>
        <div class="layui-word-aux layui-form-mid">
          {{# data.authors.forEach(function(item, index){ }}
          {{item.auth_name}},
          {{# }) }}
        </div>
      </div>
      <div class="layui-form-item">
        <label class="layui-form-label">著作权人</label>
        <div class="layui-word-aux layui-form-mid">
          {{# data.owners.forEach(function(item, index){ }}
          {{item.auth_name}},
          {{# }) }}
        </div>
      </div>
      <div class="layui-form-item">
        <label class="layui-form-label">署名</label>
        <div class="layui-word-aux layui-form-mid">
          {{data.signature || '--'}}
        </div>
      </div>
      <div class="layui-form-item">
        <label class="layui-form-label">作品独创性</label>
        <div class="layui-word-aux layui-form-mid">
          {{data.product_original || '--'}}
        </div>
      </div>
      <div class="layui-form-item">
        <label class="layui-form-label">作品附件</label>
        <div class="layui-form-mid">
          {{# layui.each(data.attach_files, function(index, file) { }}
          <a style="padding-right: 20px; color: blue" href="{{file.file_path}}" target="_blank">附件{{index+1}}</a>
          {{# }) }}
        </div>
      </div>
    </div>
  </div>
  <div class="layui-card">
    <div class="layui-card-header">
      支付信息
    </div>
    <div class="layui-card-body">
      <div class="layui-row">
        <div class="layui-inline">
          <div class="layui-form-item">
            <label class="layui-form-label">支付方式</label>
            <div class="layui-input-inline layui-word-aux layui-form-mid">
              {{data.settle_way.description}}
            </div>
          </div>
        </div>
        <div class="layui-inline">
          <div class="layui-form-item">
            <label class="layui-form-label">支付金额</label>
            <div class="layui-input-inline layui-word-aux layui-form-mid">
              {{data.display_pay_amount}} 元
            </div>
          </div>
        </div>
      </div>
      {{# if (data.order) { }}
      <div class="layui-row">
        <div class="layui-inline">
          <div class="layui-form-item">
            <label class="layui-form-label">订单号</label>
            <div class="layui-input-inline layui-word-aux layui-form-mid">
              {{data.order ? data.order.order_id : '--'}}
            </div>
          </div>
        </div>
        <div class="layui-inline">
          <div class="layui-form-item">
            <label class="layui-form-label">支付状态</label>
            <div class="layui-input-inline layui-word-aux layui-form-mid">
              {{data.order.pay_status.description}}
            </div>
          </div>
        </div>
      </div>
      {{# } }}
    </div>
  </div>
  <div class="layui-card">
    <div class="layui-card-header">
      登记信息
    </div>
    <div class="layui-card-body">
      {{# if (data.status.value === 'pass') { }}
      <div class="layui-form-item">
        <label class="layui-form-label">证书预览</label>
        <div class="layui-input-inline layui-word-aux layui-form-mid">
          {{# layui.each(data.cert_images, function(index, image_url) { }}
          <img style="width: 100px; object-fit: scale-down" src="{{image_url}}" layadmin-event="imagePreview">
          {{# }) }}
        </div>
      </div>
      <div class="layui-form-item">
        <label class="layui-form-label">证书下载</label>
        <div class="layui-input-inline layui-word-aux layui-form-mid">
          <a target="_blank" href="{{data.cert_file_url}}" style="color: blue">点击下载</a>
        </div>
      </div>
      {{# } }}
      <div class="layui-form-item">
        <label class="layui-form-label">审核历史</label>
        <div class="layui-input-block">
          <table width="100%" class="layui-table">
            <tr>
              <td style="width: 180px">时间</td>
              <td>描述</td>
            </tr>
            {{# layui.each(data.audit_histories, function(index, history){ }}
            <tr>
              <td>{{history.created_at}}</td>
              <td>
                {{history.title}}
                {{# if (history.remark) { }}
                : {{history.remark}}
                {{# } }}
              </td>
            </tr>
            {{# }) }}
          </table>
        </div>
      </div>
    </div>
  </div>
</script>
